OPEN SOURCE SOCIAL NETWORK 6.6
Loading...
Searching...
No Matches
OssnUser Class Reference
Inheritance diagram for OssnUser:
OssnEntities OssnDatabase OssnBase OssnSession

Public Member Functions

 initAttributes ()
 
 addUser ()
 
 isOssnUsername ()
 
 isOssnEmail ()
 
 getUser ()
 
 isPassword ()
 
 isEmail ()
 
 isUsername ()
 
 generateSalt ()
 
 setPassAlgo ($algo='')
 
 getPassAlog ()
 
 verifyPassword ($password, $salt, $hash)
 
 generate_password ($password='', $salt='')
 
 Login ()
 
 update_last_login ()
 
 getFriendRequests ($user='')
 
 isFriend ($usera, $user2)
 
 getFriends ($user='', array $options=array())
 
 sendRequest ($from, $to)
 
 requestExists ($from, $user)
 
 deleteFriend ($from, $to)
 
 getSiteUsers ($params=array())
 
 update_last_activity ()
 
 online_total ()
 
 getOnline ($intervals='100')
 
 searchUsers (array $params=array())
 
 ValidateRegistration ($code)
 
 iconURL ()
 
 profileURL ($extends='')
 
 SendResetLogin ()
 
 resetPassword ($password)
 
 deleteResetCode ()
 
 isOnline ($intervals=100)
 
 deleteUser ()
 
 isUserVALIDATED ()
 
 resendValidationEmail ()
 
 getUnvalidatedUSERS ($search='', $count=false)
 
 getProfilePhoto ()
 
 getProfileCover ()
 
 countByYearMonth ()
 
 getGenders ()
 
 genderTypes ()
 
 countByGender ($gender='male')
 
 onlineByGender ($gender='male', $count=false, $intervals=100)
 
 save ()
 
 canModerate ()
 
 isAdmin ()
 
- Public Member Functions inherited from OssnEntities
 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid='')
 
 searchEntities (array $params=array())
 
 canChange ($user='')
 
 destruct ()
 
- Public Member Functions inherited from OssnDatabase
 __construct ()
 
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ($values=array())
 
 update ($params=array())
 
 select ($params, $multi='')
 
 fetch ($data=false)
 
 delete ($params)
 
 getLastEntry ()
 
 constructWheres (array $array, $operator="AND")
 
 generateLimit ($data_limit=false, $page_limit=false, $offset=false)
 
 clearVars ()
 
 __destruct ()
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 
 __call ($method, $args)
 

Static Public Member Functions

static Logout ()
 
static setLogin ($userid)
 
- Static Public Member Functions inherited from OssnSession
static start ()
 
static assign ($name='', $value='')
 
static unassign ($name='')
 
static isSession ($name='')
 
static getSession ($name='')
 

Member Function Documentation

◆ addUser()

addUser ( )

Add user to system.

Returns
boolean

◆ canModerate()

canModerate ( )

Can Moderate Check if user can moderate the requested item or not

Returns
boolean

◆ countByGender()

countByGender (   $gender = 'male')

Get total users per month for each year

Returns
object|false @access public

◆ countByYearMonth()

countByYearMonth ( )

Get total users per month for each year

Returns
object|false @access public

◆ deleteFriend()

deleteFriend (   $from,
  $to 
)

Delete friend from list

Returns
boolean

◆ deleteResetCode()

deleteResetCode ( )

Remove user reset code

Returns
boolean

◆ deleteUser()

deleteUser ( )

Delete user from syste,

Returns
boolean

◆ genderTypes()

genderTypes ( )

Gender types

Returns
object|false @access public

◆ generate_password()

generate_password (   $password = '',
  $salt = '' 
)

Generate password.

Returns
string

◆ generateSalt()

generateSalt ( )

Generate salt.

Returns
string

◆ getFriendRequests()

getFriendRequests (   $user = '')

Get user friends requests.

Returns
object

◆ getFriends()

getFriends (   $user = '',
array  $options = array() 
)

Get user friends.

Returns
object

◆ getGenders()

getGenders ( )

List existing Genders

Returns
array @access public

◆ getOnline()

getOnline (   $intervals = '100')

Get online site users.

@params integer $intervals Seconds

Returns
object

◆ getPassAlog()

getPassAlog ( )

Get a password encryption algorithm

Returns
string

◆ getProfileCover()

getProfileCover ( )

Get a user last coverphoto photo

Returns
object|false

◆ getProfilePhoto()

getProfilePhoto ( )

Get a user last profile photo

Returns
object|false

◆ getSiteUsers()

getSiteUsers (   $params = array())

Get site users.

Parameters
array$paramsA options values
Note
This method will be removed from Ossn v5
Returns
array

◆ getUnvalidatedUSERS()

getUnvalidatedUSERS (   $search = '',
  $count = false 
)

Get list of unvalidated users

Returns
false|object

◆ getUser()

getUser ( )

Get user with its entities.

Returns
object

◆ iconURL()

iconURL ( )

View user icon url

Returns
string

◆ initAttributes()

initAttributes ( )

Initialize the objects.

Returns
void

Reimplemented from OssnEntities.

◆ isAdmin()

isAdmin ( )

isAdmin Check if user is admin or not

Returns
boolean

◆ isEmail()

isEmail ( )

Check if password is > 5 or not.

Returns
boolean

◆ isFriend()

isFriend (   $usera,
  $user2 
)

Check if the user is friend with other or not.

Returns
boolean

◆ isOnline()

isOnline (   $intervals = 100)

Check if user is online or not

Returns
boolean

◆ isOssnEmail()

isOssnEmail ( )

Check if email is exist in database or not.

Returns
boolean

◆ isOssnUsername()

isOssnUsername ( )

Check if username is exist in database or not.

Returns
boolean

◆ isPassword()

isPassword ( )

Check if password is > 5 or not.

Returns
boolean

◆ isUsername()

isUsername ( )

Check if the user is correct or not.

Returns
boolean

◆ isUserVALIDATED()

isUserVALIDATED ( )

Check if user is validated or not

Returns
boolean

◆ Login()

Login ( )

Login into site.

Returns
boolean

◆ Logout()

static Logout ( )
static

User logout

Returns
void

◆ online_total()

online_total ( )

Count Total online site users.

Returns
boolean

◆ onlineByGender()

onlineByGender (   $gender = 'male',
  $count = false,
  $intervals = 100 
)

Get online users by gender

Parameters
string$genderGender type
boolean$counttrue or false
integer$intervalsSeconds
Returns
object|false @access public

◆ profileURL()

profileURL (   $extends = '')

View user profile url

Returns
string

◆ requestExists()

requestExists (   $from,
  $user 
)

Check if the request already sent or not.

Parameters
integer$fromRelation from guid
integer$userRelation to , user guid
Returns
boolean

◆ resendValidationEmail()

resendValidationEmail ( )

Resend validation email to user

Returns
boolean

◆ resetPassword()

resetPassword (   $password)

Reset user password

Returns
boolean

◆ save()

save ( )

Save a user entity

Returns
boolean

Reimplemented from OssnEntities.

◆ searchUsers()

searchUsers ( array  $params = array())

Search users using a keyword or entities_pairs

Parameters
array$paramsA valid options in format: 'keyword' => A keyword to search users 'entities_pairs' => A entities pairs options, must be array 'limit' => Result limit default, Default is 10 values 'count' => True if you wanted to count search items. 'order_by' => To show result in sepcific order. Default is Assending

reutrn array|false;

◆ sendRequest()

sendRequest (   $from,
  $to 
)

Send request to other user.

Returns
boolean

◆ SendResetLogin()

SendResetLogin ( )

Send user reset password link

Returns
boolean

◆ setLogin()

static setLogin (   $userid)
static

login the user based on given input (by username, email, guid)

Parameters
int | string$userA username, email, guid
Returns
boolean

◆ setPassAlgo()

setPassAlgo (   $algo = '')

Set a password encryption algorithm

Parameters
string$algoalgorithm name bcrypt/argon2i/md5
Returns
void

◆ update_last_activity()

update_last_activity ( )

Update user last activity time

Returns
boolean

◆ update_last_login()

update_last_login ( )

Update user last login time.

Returns
boolean

◆ ValidateRegistration()

ValidateRegistration (   $code)

Validate User Registration

Returns
boolean

◆ verifyPassword()

verifyPassword (   $password,
  $salt,
  $hash 
)

Verify a password

Parameters
string$passwordNew entered password
string$saltUser actual password salt
string$hashActual password
Returns
boolean

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