CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: current_user_api.php

Source Location: /core/current_user_api.php



Page Details:



Tags:

copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
link:  http://www.mantisbt.org
usedby:  collapse_api.php


Includes:

require_once('filter_api.php') [line 28]
requires filter_api







current_user_ensure_unprotected [line 183]

void current_user_ensure_unprotected( )

Triggers an ERROR if the current user account is protected.

The $g_anonymous_account user is always considered protected.




Tags:

access:  public


[ Top ]



current_user_get_accessible_projects [line 116]

an current_user_get_accessible_projects( [show_disabled $p_show_disabled = false])

Returns an array of projects that are accessible to the current logged in user.



Tags:

return:  array of accessible project ids.
access:  public


Parameters

show_disabled   $p_show_disabled   Include disabled projects.
[ Top ]



current_user_get_accessible_subprojects [line 129]

an current_user_get_accessible_subprojects( project_id $p_project_id, [show_disabled $p_show_disabled = false])

Returns an array of subprojects of the specified project to which the currently logged in user has access to.



Tags:

return:  array of accessible sub-project ids.
access:  public


Parameters

project_id   $p_project_id   Parent project id.
show_disabled   $p_show_disabled   Include disabled projects.
[ Top ]



current_user_get_access_level [line 38]

access current_user_get_access_level( )

Returns the access level of the current user in the current project



Tags:

return:  level code
access:  public


[ Top ]



current_user_get_all_accessible_subprojects [line 141]

an current_user_get_all_accessible_subprojects( project_id $p_project_id)

Returns an array of subprojects of the specified project to which the currently logged in user has access, including subprojects of subprojects



Tags:

return:  array of accessible sub-project ids.
access:  public


Parameters

project_id   $p_project_id   Parent project id.
[ Top ]



current_user_get_assigned_open_bug_count [line 49]

Number current_user_get_assigned_open_bug_count( )

Returns the number of open issues that are assigned to the current user in the current project.



Tags:

return:  of issues assigned to current user that are still open.
access:  public


[ Top ]



current_user_get_bug_filter [line 193]

Active current_user_get_bug_filter( [ $p_project_id = null])

Returns the issue filter parameters for the current user



Tags:

return:  issue filter for current user or false if no filter is currently defined.
access:  public


Parameters

   $p_project_id  
[ Top ]



current_user_get_field [line 71]

Get current_user_get_field( field_name $p_field_name)

Returns the specified field of the currently logged in user



Tags:

return:  the value of the specified field for current user.
access:  public


Parameters

field_name   $p_field_name   Name of user property as in the table definition.
[ Top ]



current_user_get_pref [line 83]

Get current_user_get_pref( pref_name $p_pref_name)

Returns the specified field of the currently logged in user



Tags:

return:  the value of the specified preference for current user.
access:  public


Parameters

pref_name   $p_pref_name   Name of user preference as in the preferences table definition.
[ Top ]



current_user_get_reported_open_bug_count [line 60]

Number current_user_get_reported_open_bug_count( )

Returns the number of open reported bugs by the current user in the current project



Tags:

return:  of issues reported by current user that are still open.
access:  public


[ Top ]



current_user_is_administrator [line 152]

true: current_user_is_administrator( )

Returns true if the currently logged in user is has a role of administrator or higher, false otherwise



Tags:

return:  administrator; false: otherwise.
access:  public


[ Top ]



current_user_is_anonymous [line 173]

true: current_user_is_anonymous( )

Returns true if the current user is the anonymous user.



Tags:

return:  user is anonymous; false: otherwise.
access:  public


[ Top ]



current_user_is_protected [line 163]

true: current_user_is_protected( )

Returns true if the current user is a protected user, false otherwise.

The $g_anonymous_account user is always considered protected.




Tags:

return:  user is protected; false: otherwise.
access:  public


[ Top ]



current_user_set_default_project [line 104]

void current_user_set_default_project( project_id $p_project_id)

Return the specified field of the currently logged in user



Tags:

access:  public


Parameters

project_id   $p_project_id   The new default project id.
[ Top ]



current_user_set_pref [line 94]

void current_user_set_pref( pref_name $p_pref_name, pref_value $p_pref_value)

Sets the specified preference for the current logged in user.



Tags:

access:  public


Parameters

pref_name   $p_pref_name   The name of the preference as in the preferences table.
pref_value   $p_pref_value   The preference new value.
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:21 +0900 by phpDocumentor 1.4.3
inserted by FC2 system