Page 1 of 1

user.isGuest()

Posted: 12 May 2009, 19:17
by BigFIsh
It could be nice to have a boolean flag for guest user type.

i.e. user.isGuest()

Sometimes, we would like to limit the functionality for guest users. It's a little tricky to determine if that user is a guest or not. Or did I miss something :)

Posted: 12 May 2009, 21:55
by Gnoll
Good idea I think,
currently you could use getName() and substr the first 5 letters however a boolean will be helpful.

Gnoll

Posted: 10 Jun 2009, 19:53
by mhdside
I don't see this as a big need, as guests are already identified by their names.

even if you want a fast way to determine guests you can make a simple function like this:

Code: Select all

function isGuest(user:User):Boolean
{
    if (user.getName().subString(0, 5) == "guest")
        return true;

    return false;
}

Posted: 11 Jun 2009, 06:23
by Lapo
User permissions is one interesting area we'd like to cover in the next major release. Thanks for the submission