The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

iRedAdmin::Admin - API for add, edit, delete, enable and disable User Admin

VERSION

Version 0.02

SYNOPSIS

    use iRedAdmin;
     
    my $iredadmin = iRedAdmin->new(
        url => 'https://hostname.mydomain.com/iredadmin',
        username => 'postmaster@mydomain.com',
        password => 'your_password',
        cookie => '/home/user/cookie.txt',
        lang => 3
    );
    
    my $admin = $iredadmin->Admin->Add(
        email => 'foo@domain.com',
        password => 'your_password',
        name => 'Foo',
        lang => 3
    );
    
    print $iredadmin->error unless $admin; # print error if $admin is equal 0
    

METHODS

Add

Method to add Admin.

Arguments

email

Email of Admin

password

Password of Admin

name

Display Name of Admin (Optional)

lang

Language default of Admin, default English. See more about lang

Edit

Method to edit Admin.

Arguments

email

Email of Admin

name

Change Display Name of Admin

lang

Change language default of Admin

enable

1 to enable, 0 to disable, without set not change account

Password

Method to change password of Admin.

Arguments

email

Email of Admin

password

New password of Admin

Enable

Method to enable Admins.

Example

    $iredadmin->Admin->Enable(
       'foo@domain.com',
       'bar@domain.com',
       'baz@domain.com'
    );

Disable

Method to disable Admins.

Example

    $iredadmin->Admin->Disable(
       'foo@domain.com',
       'bar@domain.com',
       'baz@domain.com'
    );

Delete

Method to delete Admins.

Example

    $iredadmin->Admin->Delete(
       'foo@domain.com',
       'bar@domain.com',
       'baz@domain.com'
    );

AUTHOR

Lucas Tiago de Moraes, <lucastiagodemoraes@gmail.com>

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.