Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ClipitActivity
  • ClipitChat
  • ClipitComment
  • ClipitEvent
  • ClipitExample
  • ClipitFile
  • ClipitGroup
  • ClipitLA
  • ClipitLabel
  • ClipitPerformanceItem
  • ClipitPerformanceRating
  • ClipitPost
  • ClipitQuiz
  • ClipitQuizQuestion
  • ClipitQuizResult
  • ClipitRating
  • ClipitRemoteTrickyTopic
  • ClipitRemoteVideo
  • ClipitResource
  • ClipitSite
  • ClipitStoryboard
  • ClipitTag
  • ClipitTagRating
  • ClipitTask
  • ClipitTrickyTopic
  • ClipitUser
  • ClipitVideo
  • Overview
  • Package
  • Class
  • Tree

Class ClipitUser

Represents each human user interacting directly or indirectly with the ClipIt.

UBItem
Extended by UBUser
Extended by ClipitUser
Package: ClipIt\clipit\api
License: Affero General Public License v3
Author: Pablo LlinĂ¡s Arnaiz <pebs74@gmail.com>, URJC JuxtaLearn Team
Located at ClipitUser.php
Methods summary
protected boolean|integer
# save( )

Saves this instance into the system.

Saves this instance into the system.

Returns

boolean|integer
Returns id of saved instance, or false if error.

Overrides

UBUser::save()
public static boolean
# login( string $login, string $password, boolean $persistent = false )

Authenticate a user and log him into the system.

Authenticate a user and log him into the system.

Parameters

$login
string
$login User login
$password
string
$password User password
$persistent
boolean
$persistent Determines whether to make the session persistent

Returns

boolean
Returns true if ok, or false if error

Overrides

UBUser::login()
public static boolean
# logout( )

Logs out a user from the system.

Logs out a user from the system.

Returns

boolean
Returns true if ok, or false if error.

Overrides

UBUser::logout()
public static array
# get_groups( integer $user_id )

Get all Group Ids in which a user is member of.

Get all Group Ids in which a user is member of.

Parameters

$user_id
integer
$user_id Id of the user to get groups from.

Returns

array
Returns an array of Group IDs the user is member of.
public static array
# get_activities( integer $user_id, boolean $joined_only = false )

Get all Activity Ids in which a Student is member of, or a Teacher is in charge of.

Get all Activity Ids in which a Student is member of, or a Teacher is in charge of.

Parameters

$user_id
integer
$user_id Id of the user to get activities from.
$joined_only
boolean
$joined_only Only returnes Activities where a Student user has joined to a group.

Returns

array
Returns an array of Activity IDs the user is member of.
public static integer
# set_role_student( integer $user_id )

Sets a User role to Student.

Sets a User role to Student.

Parameters

$user_id
integer
$user_id User Id.

Returns

integer
Returns the User Id if set correctly.
public static integer
# set_role_teacher( integer $user_id )

Sets a User role to Teacher.

Sets a User role to Teacher.

Parameters

$user_id
integer
$user_id User Id.

Returns

integer
Returns the User Id if set correctly.
public static integer
# set_role_admin( integer $user_id )

Sets a User role to Admin.

Sets a User role to Admin.

Parameters

$user_id
integer
$user_id User Id.

Returns

integer
Returns the User Id if set correctly.
Methods inherited from UBUser
__construct(), copy_from_elgg(), copy_to_elgg(), create_password(), get_avatar(), get_by_email(), get_by_login(), get_by_role(), get_last_login(), import_data(), set_avatar(), set_properties()
Methods inherited from UBItem
count_all(), create(), create_clone(), delete_all(), delete_by_id(), get_all(), get_all_parents(), get_by_id(), get_by_owner(), get_clone_tree(), get_cloned_from(), get_clones(), get_events(), get_from_search(), get_properties(), link_parent_clone(), list_properties(), sort_by_date(), sort_by_date_inv(), sort_by_name(), sort_by_name_inv(), sort_numbers(), sort_numbers_inv(), unlink_from_clones(), unlink_from_parent()
Constants summary
string ROLE_STUDENT "student"
#

Const

Role name for Students
string ROLE_TEACHER "teacher"
#

Const

Role name for Teachers
string ROLE_ADMIN "admin"
#

Const

Role name for Administrators
integer COOKIE_TOKEN_DURATION 60
#

Const

Default cookie token duration in minutes
Constants inherited from UBItem
REL_PARENT_CLONE, SUBTYPE, TYPE
Properties inherited from UBUser
$avatar_file, $email, $language, $last_login, $login, $password, $role
Properties inherited from UBItem
$clone_array, $cloned_from, $description, $id, $name, $owner_id, $time_created, $url
API documentation generated by ApiGen 2.8.0