Detailed Description
Working with user's accounts.
- Author
- Dodonov A.A.
Definition at line 26 of file user_markup.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 67 of file user_markup.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->PermitAlgorithms =
get_package(
'permit::permit_algorithms' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
$this->UserAlgorithms =
get_package(
'user::user_algorithms' ,
'last' , __FILE__ );
$this->UserView =
get_package(
'user::user_view' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_auth |
( |
& |
$Settings, |
|
|
|
$Data |
|
) |
| |
Function compiles блока 'logged_in'.
- Parameters
-
| $Settings | - Parameters. |
| $Data | - Data. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 148 of file user_markup.php.
{
try
{
$RawSettings = $Settings->get_raw_settings();
$Flag = array_shift( array_keys( $RawSettings ) );
$ShowData = ( $Flag == 'logged_in' && $this->UserAlgorithms->logged_in() === true ) ||
( $Flag == 'guest' && $this->UserAlgorithms->logged_in() === false );
if( $ShowData )
{
return( $Data );
}
return( '' );
}
catch( Exception $e )
{
}
}
| compile_months_on_site |
( |
& |
$Settings | ) |
|
Function compiles macro 'months_on_site'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 325 of file user_markup.php.
{
try
{
$User = $this->UserAlgorithms->get_by_id( $Settings->get_setting( 'user_id' ) );
$Code = time() - strtotime(
get_field( $User ,
'registered' ) );
$Code = intval( $Code / ( 30 * 24 * 60 * 60 ) );
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_session_login |
( |
& |
$Settings | ) |
|
Function compiles macro 'session_login'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 105 of file user_markup.php.
{
try
{
if( $this->UserAlgorithms->logged_in() )
{
return( $this->UserAlgorithms->get_login() );
}
return( 'public' );
}
catch( Exception $e )
{
}
}
| compile_user_id |
( |
& |
$Settings | ) |
|
Function compiles macro 'user_id'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 193 of file user_markup.php.
{
try
{
if( $this->UserAlgorithms->logged_in() )
{
return( $this->UserAlgorithms->get_id() );
}
return( $this->UserAccess->GuestUserId );
}
catch( Exception $e )
{
}
}
| compile_user_list |
( |
& |
$Settings | ) |
|
Function compiles macro 'user_list'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 278 of file user_markup.php.
{
try
{
$Users = $this->fetch_users( $Settings );
$Name = $Settings->get_setting( 'name' );
$Field = $Settings->get_setting( 'field' , 'login' );
$Code = '';
foreach( $Users as $i => $id )
{
$User = $this->UserAlgorithms->get_by_id( $id );
$Code .= "{checkbox:name=_$Name".get_field( $User , 'id' ).";current_value=on}".
$this->CahcedMultyFS->get_template( __FILE__ , 'user_end_line.tpl' );
}
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_user_login |
( |
& |
$Settings | ) |
|
Function compiles macro 'user_login'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 364 of file user_markup.php.
{
try
{
$User = $this->UserAlgorithms->get_by_id( $Settings->get_setting( 'user_id' ) );
}
catch( Exception $e )
{
}
}
Field Documentation
If the registration exists.
- Author
- Dodonov A.A.
Definition at line 55 of file user_markup.php.
| $PermitAlgorithms = false |
The documentation for this class was generated from the following file: