Added isVisitor, isAdmin, and isRegistered methods to User object instead
of hard coding checks everywhere with group ids. And updated the code base to match.
This commit is contained in:
parent
586164d8d0
commit
ef120fb06b
52 changed files with 201 additions and 118 deletions
|
|
@ -104,7 +104,7 @@ sub addWord {
|
|||
my $language = shift;
|
||||
my $word = shift;
|
||||
die "You must be logged in to add words to your dictionary.\n:"
|
||||
if ($session->user->userId eq '1');
|
||||
if ($session->user->isVisitor);
|
||||
my $speller = _getSpeller($session, $language);
|
||||
$speller->add_to_personal($word);
|
||||
$speller->save_all_word_lists;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue