ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
Auth_Container_SMBPasswd Class Reference
+ Inheritance diagram for Auth_Container_SMBPasswd:
+ Collaboration diagram for Auth_Container_SMBPasswd:

Public Member Functions

 Auth_Container_SMBPasswd ($filename)
 Constructor of the container class. More...
 
 fetchData ($username, $password)
 Get user information from pwfile. More...
 
 listUsers ()
 
 addUser ($username, $password, $additional='')
 Add a new user to the storage container. More...
 
 removeUser ($username)
 Remove user from the storage container. More...
 
 changePassword ($username, $password)
 Change password for user in the storage container. More...
 
- Public Member Functions inherited from Auth_Container
 Auth_Container ()
 Constructor. More...
 
 fetchData ($username, $password, $isChallengeResponse=false)
 Fetch data from storage container. More...
 
 verifyPassword ($password1, $password2, $cryptType="md5")
 Crypt and verfiy the entered password. More...
 
 supportsChallengeResponse ()
 Returns true if the container supports Challenge Response password authentication. More...
 
 getCryptType ()
 Returns the crypt current crypt type of the container. More...
 
 listUsers ()
 List all users that are available from the storage container. More...
 
 getUser ($username)
 Returns a user assoc array. More...
 
 addUser ($username, $password, $additional=null)
 Add a new user to the storage container. More...
 
 removeUser ($username)
 Remove user from the storage container. More...
 
 changePassword ($username, $password)
 Change password for user in the storage container. More...
 
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message to the Auth log. More...
 
- Public Member Functions inherited from ilAuthContainerBase
 loginObserver ($a_username, $a_auth)
 Called after successful login. More...
 
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login. More...
 
 checkAuthObserver ($a_username, $a_auth)
 Called after check auth requests. More...
 
 logoutObserver ($a_username, $a_auth)
 Called after logout. More...
 
 supportsCaptchaVerification ()
 Returns whether or not the auth container supports the verification of captchas This should be true for those auth methods, which are available in the default login form. More...
 

Data Fields

 $pwfile
 
- Data Fields inherited from Auth_Container
 $activeUser = ""
 User that is currently selected from the storage container. More...
 
 $_auth_obj = null
 The Auth object this container is attached to. More...
 

Detailed Description

Definition at line 63 of file SMBPasswd.php.

Member Function Documentation

◆ addUser()

Auth_Container_SMBPasswd::addUser (   $username,
  $password,
  $additional = '' 
)

Add a new user to the storage container.

Parameters
stringUsername
stringPassword
arrayAdditional information
Returns
boolean

Definition at line 132 of file SMBPasswd.php.

References $additional, $pass, $res, AUTH_LOG_DEBUG, and Auth_Container\log().

133  {
134  $this->log('Auth_Container_SMBPasswd::addUser() called.', AUTH_LOG_DEBUG);
135  $res = $this->pwfile->addUser($user, $additional['userid'], $pass);
136  if ($res === true) {
137  return $this->pwfile->save();
138  }
139  return $res;
140  }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
$additional
Definition: goto.php:89
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
+ Here is the call graph for this function:

◆ Auth_Container_SMBPasswd()

Auth_Container_SMBPasswd::Auth_Container_SMBPasswd (   $filename)

Constructor of the container class.

Parameters
$filenamestring filename for a passwd type file
Returns
object Returns an error object if something went wrong

Definition at line 84 of file SMBPasswd.php.

References $filename, PEAR_ERROR_DIE, and PEAR\raiseError().

85  {
86  $this->pwfile = new File_SMBPasswd($filename,0);
87 
88  if (!$this->pwfile->load()) {
89  PEAR::raiseError("Error while reading file contents.", 41, PEAR_ERROR_DIE);
90  return;
91  }
92 
93  }
const PEAR_ERROR_DIE
Definition: PEAR.php:34
$filename
Definition: buildRTE.php:89
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
Definition: PEAR.php:524
+ Here is the call graph for this function:

◆ changePassword()

Auth_Container_SMBPasswd::changePassword (   $username,
  $password 
)

Change password for user in the storage container.

Parameters
stringUsername
stringThe new password

Definition at line 169 of file SMBPasswd.php.

References $res, AUTH_LOG_DEBUG, and Auth_Container\log().

170  {
171  $this->log('Auth_Container_SMBPasswd::changePassword() called.', AUTH_LOG_DEBUG);
172  $res = $this->pwfile->modUser($username, '', $password);
173  if ($res === true) {
174  return $this->pwfile->save();
175  }
176  return $res;
177  }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
+ Here is the call graph for this function:

◆ fetchData()

Auth_Container_SMBPasswd::fetchData (   $username,
  $password 
)

Get user information from pwfile.

Parameters
stringUsername
stringPassword
Returns
boolean

Definition at line 105 of file SMBPasswd.php.

References AUTH_LOG_DEBUG, and Auth_Container\log().

106  {
107  $this->log('Auth_Container_SMBPasswd::fetchData() called.', AUTH_LOG_DEBUG);
108  return $this->pwfile->verifyAccount($username, $password);
109  }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
+ Here is the call graph for this function:

◆ listUsers()

Auth_Container_SMBPasswd::listUsers ( )

Definition at line 114 of file SMBPasswd.php.

References AUTH_LOG_DEBUG, and Auth_Container\log().

115  {
116  $this->log('Auth_Container_SMBPasswd::fetchData() called.', AUTH_LOG_DEBUG);
117  return $this->pwfile->getAccounts();
118  }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
+ Here is the call graph for this function:

◆ removeUser()

Auth_Container_SMBPasswd::removeUser (   $username)

Remove user from the storage container.

Parameters
stringUsername

Definition at line 150 of file SMBPasswd.php.

References $res, AUTH_LOG_DEBUG, and Auth_Container\log().

151  {
152  $this->log('Auth_Container_SMBPasswd::removeUser() called.', AUTH_LOG_DEBUG);
153  $res = $this->pwfile->delUser($username);
154  if ($res === true) {
155  return $this->pwfile->save();
156  }
157  return $res;
158  }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
+ Here is the call graph for this function:

Field Documentation

◆ $pwfile

Auth_Container_SMBPasswd::$pwfile

Definition at line 72 of file SMBPasswd.php.


The documentation for this class was generated from the following file: