- Posts: 9
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
public function newUserSession() { $sUser = $this->getUserName(); $oUser = $this->api->getUserByName($sUser); if (is_null($oUser)) { # Creating a new user. . . . if ($oUser->save()) { // read again user from newly created entry Permission::model()->setGlobalPermission($oUser->uid, 'surveys', array('create_p')); Permission::model()->setGlobalPermission($oUser->uid, 'templates', array('read_p')); $this->setAuthSuccess($oUser);