Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/storage/PhabricatorConduitToken.php
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | foreach ($tokens as $token) { | ||||
| return $token; | return $token; | ||||
| } | } | ||||
| } | } | ||||
| // We didn't find any existing tokens (or the existing tokens are all about | // We didn't find any existing tokens (or the existing tokens are all about | ||||
| // to expire) so generate a new token. | // to expire) so generate a new token. | ||||
| $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | ||||
| $token = PhabricatorConduitToken::initializeNewToken( | $token = self::initializeNewToken( | ||||
| $user->getPHID(), | $user->getPHID(), | ||||
| self::TYPE_CLUSTER); | self::TYPE_CLUSTER); | ||||
| $token->save(); | $token->save(); | ||||
| unset($unguarded); | unset($unguarded); | ||||
| return $token; | return $token; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines | |||||