Re: AddUser basic question

<cron-jbULQAKo4A5fyO9Q7EP/[email protected]> Tue, 8 Nov 2005 15:30:46 -0300
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Just to check if i got this right

>From LiverUser.php
 */
define('LIVEUSER_MAX_LEVEL', 3);

/**#@+
 * Usertypes
 *
 * @var integer
 */
/**
 * lowest user type id
 */
define('LIVEUSER_ANONYMOUS_TYPE_ID',   0);
/**
 * lowest user type id
 */
// higest user type id
define('LIVEUSER_USER_TYPE_ID',        1);
/**
 * lowest admin type id
 */
define('LIVEUSER_ADMIN_TYPE_ID',       2);
define('LIVEUSER_AREAADMIN_TYPE_ID',   3);
define('LIVEUSER_SUPERADMIN_TYPE_ID',  4);
/**
 * higest admin type id
 */
define('LIVEUSER_MASTERADMIN_TYPE_ID', 5);
/**#@-*/

So if I want to add a admin user I use $admin->addUser($data, LIVEUSER_MASTERADMIN_TYPE_ID) ?

 

I was hopping to set permissions to groups set permissions based on groups, so I guess I should add always the same user level and control what can a user do based on his group permissions.

 

This show how flexible is LiverUser, nice :)



----- Original Message ----- 
From: "Matthias Nothhaft" <[email protected]>
To: "LiveUser-DevList" <[email protected]>
Sent: Tuesday, November 08, 2005 1:20 PM
Subject: Re: [LiveUser] AddUser basic question


> cron-jbULQAKo4A5fyO9Q7EP/[email protected] schrieb:
> 
> >Hello, 
> >
> >
> >What the param $type is for?
> >
> >I know from the examples that is the user level, but user level for what?
> >
> >$admin->addUser($data, $type = LIVEUSER_USER_TYPE_ID)
> >  
> >
> See it as level of permission.
> 
> Take a look at LiveUser.php
> There are some user type constants defined.
> Using these levels you can easily separate users into general roles
> like: "anonyous users", "registered users", "administrators", ...
> 
> Hope that helps.
> 
> Regards,
> Matthias
> 
> _______________________________________________
> LiveUser mailing list
> [email protected]
> http://mailman.21st-hq.de/mailman/listinfo/liveuser
>