本文整理汇总了PHP中PFUser::getUnixName方法的典型用法代码示例。如果您正苦于以下问题:PHP PFUser::getUnixName方法的具体用法?PHP PFUser::getUnixName怎么用?PHP PFUser::getUnixName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PFUser
的用法示例。
在下文中一共展示了PFUser::getUnixName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(PFUser $user, Git_HTTP_Command $command)
{
parent::__construct();
$gitolite_user_info = posix_getpwnam('gitolite');
$this->gitolite_home = $gitolite_user_info['dir'];
$this->env['SHELL'] = '/bin/sh';
$this->env['REMOTE_USER'] = $user->getUnixName();
$this->env['GIT_HTTP_BACKEND'] = $command->getCommand();
$this->env['HOME'] = $this->gitolite_home;
$this->env['REMOTE_ADDR'] = HTTPRequest::getIPAddress();
$this->appendToEnv('REQUEST_URI');
$this->appendToEnv('REMOTE_PORT');
$this->appendToEnv('SERVER_ADDR');
$this->appendToEnv('SERVER_PORT');
}
示例2: pushUserSSHKeysToRemoteServers
/**
* Method called as a hook.
* Copies all SSH Keys to Remote Git Servers
* @param PFUser $user
*/
private function pushUserSSHKeysToRemoteServers(PFUser $user)
{
$this->getLogger()->info('Trying to push ssh keys for user: ' . $user->getUnixName());
$git_user_account_manager = $this->getUserAccountManager();
try {
$git_user_account_manager->pushSSHKeys($user);
} catch (Git_UserSynchronisationException $e) {
$message = $GLOBALS['Language']->getText('plugin_git', 'push_ssh_keys_error');
$GLOBALS['Response']->addFeedback('error', $message);
$this->getLogger()->error('Unable to push ssh keys: ' . $e->getMessage());
return;
}
$this->getLogger()->info('Successfully pushed ssh keys for user: ' . $user->getUnixName());
}
示例3: addMembersToProject
private function addMembersToProject(Project $project, PFUser $user)
{
$GLOBALS['sys_email_admin'] = 'noreply@localhost';
account_add_user_to_group($project->getId(), $user->getUnixName());
unset($GLOBALS['sys_email_admin']);
UserManager::clearInstance();
$this->user_manager = UserManager::instance();
}
示例4: resetUserGroupsForUser
public function resetUserGroupsForUser(PFUser $user, Project $project)
{
$database_name = $this->getMediawikiDatabaseName($project);
$group_id = $this->da->escapeInt($project->getID());
$forge_user_id = $this->da->escapeInt($user->getId());
$user_name = $this->da->quoteSmart($this->getMediawikiUserName($user->getUnixName()));
$this->deleteUserGroupsForUser($database_name, $user_name);
$this->feedMediawikiUserGroupsWithTuleapMapping($database_name, $group_id, $forge_user_id);
}
示例5: user_username
public function user_username()
{
return $this->user->getUnixName();
}
示例6: addGenericUserInProject
private function addGenericUserInProject(PFUser $user, $session_key, $group_id)
{
if (!$user->isMember($group_id)) {
$this->addProjectMember($session_key, $group_id, $user->getUnixName());
}
}
示例7: queueTV3Migration
public function queueTV3Migration(PFUser $user, Project $project, $tracker_id, $name, $description, $short_name)
{
$this->system_event_manager->createEvent(SystemEvent_TRACKER_V3_MIGRATION::NAME, $short_name . SystemEvent::PARAMETER_SEPARATOR . $name . SystemEvent::PARAMETER_SEPARATOR . $description . SystemEvent::PARAMETER_SEPARATOR . $user->getUnixName() . SystemEvent::PARAMETER_SEPARATOR . $project->getGroupId() . SystemEvent::PARAMETER_SEPARATOR . $tracker_id, SystemEvent::PRIORITY_HIGH, SystemEvent::OWNER_APP);
}