| 
    nyroFwk
    0.2
    
   | 
 
  
 Public Member Functions | |
| getUserFromCryptic ($cryptic) | |
| isLogged () | |
| getUser () | |
| setUser (db_row $user, $saveLogin=true, $cookieStayConnected=false) | |
| login ($prm=null, $page=null, $redirectIfLogged=true) | |
| logFromCryptic ($cryptic, $cookieStayConnected=false) | |
| saveCookieStayConnected () | |
| cryptPass ($str, $plus='Password') | |
| logout ($prm=null) | |
| addRole ($role) | |
| hasRole ($role=null) | |
| delRole ($role=null) | |
| check (array $url=null, $redirect=true) | |
| getLoginForm (array $prm=array()) | |
| getSession () | |
| login ($prm=null, $page=null) | |
| protect ($page=null) | |
| getPage ($type='login', $uri=false) | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| afterInit () | |
| autoLogin () | |
| saveLogin ($cookieStayConnected=false) | |
| getWhereLogin ($login, $pass) | |
| hook ($name) | |
| isContained (array $url, array $checks) | |
| beforeInit () | |
Protected Attributes | |
| $session | |
| $table | |
| $user | |
| $form | |
| $logged = false | |
| $roles = array() | |
| $cfg | |
Security class to check user rights. By default, allowing everything to the logged users
Definition at line 11 of file default.class.php.
| addRole | ( | $role | ) | 
Definition at line 256 of file default.class.php.
      
  | 
  protected | 
Definition at line 55 of file default.class.php.
      
  | 
  protected | 
Autologin the user with session vars or an eventual cookie
Definition at line 67 of file default.class.php.
      
  | 
  protectedinherited | 
Call just before the configuration initialisation
Definition at line 35 of file object.class.php.
| check | ( | array | $url = null,  | 
        
$redirect = true  | 
        |||
| ) | 
Definition at line 277 of file default.class.php.
| cryptPass | ( | $str, | |
$plus = 'Password'  | 
        |||
| ) | 
Crypt a string with the function configured
| string | $str | The string to crypt | 
| null | string | $plus | If need to used the second crypt function (or other configured) | 
Definition at line 237 of file default.class.php.
| delRole | ( | $role = null | ) | 
Definition at line 268 of file default.class.php.
      
  | 
  inherited | 
Get an attribute
| string | $name | Attribute name | 
Definition at line 48 of file object.class.php.
      
  | 
  inherited | 
| getLoginForm | ( | array | $prm = array() | ) | 
Definition at line 319 of file default.class.php.
Get a configured page
| string | $type | Pagename (login, logged, logout, forbidden) | 
| bool | $uri | Indiciate if the url should be parsed with request::uri to be used directly | 
Definition at line 101 of file security/abstract.class.php.
| getSession | ( | ) | 
Return the session object used for security
Definition at line 349 of file default.class.php.
| getUser | ( | ) | 
| getUserFromCryptic | ( | $cryptic | ) | 
Get a DB user from it's cryptic
| string | $cryptic | Cryptic | 
Definition at line 93 of file default.class.php.
      
  | 
  protected | 
Return the SQL Clause against login and password
| string | $login | Login | 
| string | $pass | Clear password | 
Definition at line 148 of file default.class.php.
| hasRole | ( | $role = null | ) | 
Definition at line 261 of file default.class.php.
      
  | 
  protectedinherited | 
Function to be rewritten in eventual child to change the way security works Available actions:
| string | $action | 
Definition at line 117 of file security/abstract.class.php.
      
  | 
  protectedinherited | 
Indicate if a configuration array is contained in the url
| array | $url | |
| array | $checks | 
Definition at line 126 of file security/abstract.class.php.
| isLogged | ( | ) | 
Definition at line 99 of file default.class.php.
| logFromCryptic | ( | $cryptic, | |
$cookieStayConnected = false  | 
        |||
| ) | 
Log a session user using his cryptic
| string | $cryptic | |
| boolean | $cookieStayConnected | Indicats if the stay connected cookie should be set | 
Definition at line 214 of file default.class.php.
      
  | 
  abstractinherited | 
Login the current user
| mixed | $prm | |
| null | string | $page | The page where to be redirected. If null, config will be used | 
| login | ( | $prm = null,  | 
        |
$page = null,  | 
        |||
$redirectIfLogged = true  | 
        |||
| ) | 
Login the current user
| mixed | $prm | |
| null | string | $page | The page where to be redirected. If null, config will be used | 
| boolean | $redirectIfLogged | Enable the redirect when login is successful | 
Definition at line 167 of file default.class.php.
| logout | ( | $prm = null | ) | 
Definition at line 244 of file default.class.php.
      
  | 
  inherited | 
Redirect the user if not logged
| null | string | $page | Page to redirect or configured page forbidden if not provided | 
Definition at line 88 of file security/abstract.class.php.
| saveCookieStayConnected | ( | ) | 
Save the connection on the parametred cookie
Definition at line 224 of file default.class.php.
      
  | 
  protected | 
Save the login. Set a new cryptic, save the DB user and save it in session.
| boolean | $cookieStayConnected | Indicats if the stay connected cookie should be set | 
Definition at line 133 of file default.class.php.
      
  | 
  inherited | 
Set an attribute
| string | $name | Attribute name | 
| mixed | $value | Attribute value | 
Definition at line 58 of file object.class.php.
Set the logged user
| db_row | $user | |
| boolean | $saveLogin | Indicates if the session should be saved | 
| boolean | $cookieStayConnected | Indicats if the stay connected cookie should be set | 
Definition at line 121 of file default.class.php.
      
  | 
  protectedinherited | 
Definition at line 17 of file object.class.php.
      
  | 
  protected | 
Definition at line 39 of file default.class.php.
      
  | 
  protected | 
Definition at line 46 of file default.class.php.
      
  | 
  protected | 
Definition at line 53 of file default.class.php.
      
  | 
  protected | 
Definition at line 18 of file default.class.php.
      
  | 
  protected | 
Definition at line 25 of file default.class.php.
      
  | 
  protected | 
Definition at line 32 of file default.class.php.
 1.8.13